Skip to content

fix: retry hash clients when timeouts are reached - #655

Open
Shubham-Padkonde wants to merge 1 commit into
pinterest:masterfrom
Shubham-Padkonde:fix/hash-client-timeout-boundaries
Open

Shubham-Padkonde wants to merge 1 commit into
pinterest:masterfrom
Shubham-Padkonde:fix/hash-client-timeout-boundaries

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

HashClient waits until elapsed time is strictly greater than its retry/dead timeout. With a zero timeout, a second call in the same clock tick therefore skips the retry or reports that all servers are down. This also makes the existing immediate-retry tests depend on clock resolution.

Treat the timeout as elapsed when the interval equals the configured value, consistently for ordinary commands, set_many, and dead-server recovery. Freeze the clock in the existing zero-timeout tests and add boundary coverage for zero and positive retry timeouts. The positive-timeout cases also verify that calls before the deadline do not retry.

Validation: two existing tests with a frozen clock and four new boundary cases fail before the change. The unit run after the fix has 496 passed, one skipped, and one Windows-only failure because this Python build lacks AF_UNIX. Black 24.4.2, Flake8 7.1.1, and diff whitespace checks pass. Compression tests were excluded because zstd could not be built locally; live memcached integration tests were not run.

@Shubham-Padkonde
Shubham-Padkonde requested review from a team and jparise as code owners October 3, 2026 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant